
for ip in `cat ip.txt`
do
	a1=`echo $ip | cut -d '.' -f 1`;
	a2=`echo $ip | cut -d '.' -f 2`;
	a3=`echo $ip | cut -d '.' -f 3`;
	a4=`echo $ip | cut -d '.' -f 4`;
	rip=`echo $a4.$a3.$a2.$a1."zen.spamhaus.org"`;
	spam=`host $rip | grep "127.0"`

	
	if [ -n "$spam" ]; then 
    		echo $ip
		echo $spam
	fi

done
